﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 设备清单基础输入参数
    /// </summary>
    public class BoardDeviceBaseInput
    {
        /// <summary>
        /// 设备编号
        /// </summary>
        public virtual string? DeviceNo { get; set; }
        
        /// <summary>
        /// 设备名称
        /// </summary>
        public virtual string? DeviceName { get; set; }
        
        /// <summary>
        /// 所在车间
        /// </summary>
        public virtual long? DevicePlace { get; set; }
        
        /// <summary>
        /// 设备状态
        /// </summary>
        public virtual int? DeviceState { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public virtual string? Demo { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual long? CreateOrgId { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual string? CreateOrgName { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime? CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public virtual DateTime? UpdateTime { get; set; }
        
        /// <summary>
        /// 创建者Id
        /// </summary>
        public virtual long? CreateUserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者Id
        /// </summary>
        public virtual long? UpdateUserId { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        public virtual bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 设备清单分页查询输入参数
    /// </summary>
    public class BoardDeviceInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 设备编号
        /// </summary>
        public string? DeviceNo { get; set; }
        
        /// <summary>
        /// 设备名称
        /// </summary>
        public string? DeviceName { get; set; }
        
        /// <summary>
        /// 所在车间
        /// </summary>
        public long? DevicePlace { get; set; }
        
        /// <summary>
        /// 设备状态
        /// </summary>
        public int? DeviceState { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public string? Demo { get; set; }
        
    }

    /// <summary>
    /// 设备清单增加输入参数
    /// </summary>
    public class AddBoardDeviceInput : BoardDeviceBaseInput
    {
        /// <summary>
        /// 设备编号
        /// </summary>
        [Required(ErrorMessage = "设备编号不能为空")]
        public override string? DeviceNo { get; set; }
        
        /// <summary>
        /// 所在车间
        /// </summary>
        [Required(ErrorMessage = "所在车间不能为空")]
        public override long? DevicePlace { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        [Required(ErrorMessage = "软删除不能为空")]
        public override bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 设备清单删除输入参数
    /// </summary>
    public class DeleteBoardDeviceInput : BaseIdInput
    {
    }

    /// <summary>
    /// 设备清单更新输入参数
    /// </summary>
    public class UpdateBoardDeviceInput : BoardDeviceBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 设备清单主键查询输入参数
    /// </summary>
    public class QueryByIdBoardDeviceInput : DeleteBoardDeviceInput
    {

    }
